// Learn cc.Class:
//  - https://docs.cocos.com/creator/manual/en/scripting/class.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

cc.Class({
    extends: cc.Component,
	
	 properties: {
		canvas:{
			default:null,
			type:cc.Node
		},
	 },

    callback(){
		
		
		
		this.canvas.runAction(cc.fadeOut(1));
		
		this.exChangeCallback = cc.callFunc(function () {
				cc.director.loadScene('gameByTime');
		}, this);
		
		this.node.runAction(cc.sequence(cc.delayTime(0.8),this.exChangeCallback));

	}
});
